<html>
<head>
<meta charset="UTF-8">

<title>TechOak</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE; ?>css/print_sales.css" />
<script  type="text/javascript" src="<?php echo TEMPLATE; ?>js-plugin/jquery/jquery-1.10.2.min.js"></script>

<script>
$(document).ready(function(){
	window.print();
});

</script> 
</head>

<body>

<div id="wrapper">
	<div class="container"">
		<div class="col-lg-5">
			<div class="row">
			<h2>TechOak</h2>
				<span>
					45 Dell ST <br>
					Sleepy Hollow, NY 10591
				</span>
			 
			</div>  <!-- end row -->
		</div>   <!-- end col-lg-5  -->
			
		<div class="col-lg-6">
			<span>
			(877) 805-6052 <br>
			support@techoak.com <br>
			<?php echo SITEURL;?> 
			</span>
			
		</div> <!-- end col-lg-6  -->
		
		<div class="col-lg-7">
		
			<img src = "<?php echo TEMPLATE; ?>images/logo.png" height="75">
	
		</div>  <!--- end col-lg-7  -->
		
	</div>   <!-- end container -->
	
</div>   <!-- end wrapper -->
 
<div id="white-wrapper">
	<div class="container">
		<div class="general-title">
		<h1>SALES RECEIPT</h1>
		</div>  <!-- end title -->

	  <div class="col-sm-3">
		<div class="col-lg-5">
			<p>
				BILL TO <br>
				<?php echo $this->sessionArray['user_prefix']." ".$this->sessionArray['user_firstname']." ".$this->sessionArray['user_lastname'] ?><br>
                                <?php echo $this->sessionArray['user_address'] ?><br>
				<?php echo $this->sessionArray['user_city'].", ".$this->sessionArray['user_state'].", ".$this->sessionArray['user_zipcode'] ?><br>
				<?php echo $this->sessionArray['user_country'];?> <br>
				
				</p>
			
		</div>   <!--  end left-slider -->	
	
		<div class="col-lg-6">
			<p>
				SALES NO. <?php  $saleid = str_replace("{-","",$this->sessionArray['qb_sale_docnumber']);
				echo str_replace("}","",$saleid);
				?> <br>
				DATE <?php  echo date('m/d/Y',strtotime($this->sessionArray['createDate']));?>
			</p>
		
		</div>   <!-- end right-slider -->

	  </div>
	</div>   <!-- end container -->
	<hr>
	
	<div class="contentTabs">
		<p>
		PMT METHOD<br>
		 <?php if($this->sessionArray['payment_gateway'] == 'paypal'):
                    echo 'Paypal';
                else:
                    echo ucfirst($this->sessionArray['payment_method']);//'Credit Card';
                endif; ?>
              
		</p>
	
	</div>   <!-- end contentTabs  -->
	
</div>
 
<div id="grey-wrapper">
	<div class="container">
		
			<table>
			
				<tr class="row-in">
					<th class="innerdiv"> </th>
					<th>ACTIVITY</th>
					<th>DATE</th>
					<th>QTY</th>
					<th>RATE</th>
					<th>AMOUNT</th>
				</tr>
				
				<?php 
				$total_amount = '';
				foreach($this->allOrderArray as $key =>$value): 
						$total_amount += $value['or_price'];
				?>
				<tr>
					<td class="nav"></td>
					<td class="navbar"><?php echo $value['prd_name']. " ( ".$value['prd_code'] ." )" ?></td>
					<td><?php echo date('m/d/Y',strtotime($value['or_createdate'])); ?></td>
					<td><?php echo  $value['or_prd_qty']; ?></td>
					<td>$ <?php echo $value['or_prd_price']; ?></td>
					<td>$ <?php echo $value['or_price']; ?></td>
				</tr>
				<?php endforeach;?>
                                <?php if($value['pt_coupon_code'] != ''):?>
                                <tr>
					<td class="nav"></td>
                                        <td class="navbar"><?php echo "Discount Code - ".$value['pt_coupon_code'] ?></td>
					<td><?php echo date('m/d/Y',strtotime($value['or_createdate'])); ?></td>
					<td><?php echo  $value['pt_coupon_qty']; ?></td>
					<td> - $<?php echo $value['pt_coupon_price']; ?></td>
					<td> - $<?php echo $value['pt_coupon_qty'] * $value['pt_coupon_price']; ?></td>
				</tr>
                                <?php  endif;?>
			</table>
	
	</div>  <!-- end container -->

</div>

<div id="footer">
	<div class="container">
		<p>Total includes all applicable taxes.</p>
		<div class="col-sm-3">
		
		<div class="col-md-3">
			<p>
				TOTAL<br>
			</p>	

		</div>   <!-- end col-md-3 -->
		
		<div class="col-md-5">
			<p>
				$ <?php $final_Amt = $total_amount - ($value['pt_coupon_qty'] * $value['pt_coupon_price']);
                echo number_format($final_Amt,2);?></p><br>
			
		</div>
		
		</div>
	</div>  <!-- end container -->

</div>  <!-- end footer -->
 
<div class="copyrights">
	<div class="container">
		<p>
			Thank you for your business <br>
			<?php echo SITEURL;?>terms-and-conditions
		<p>
	</div>  <!-- end container  -->
</div>  <!-- end copyrights  -->
 
 
</body>
</html>